package homework.Day0323;

public class Library<T extends Media> {
    private T book;

    public T getBook() {
        return book;
    }

    public void setBook(T book) {
        this.book = book;
    }
}

class Media{
    private String name;

    public Media(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Media{" +
                "name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

class Novel extends Media{

    public Novel(String name) {
        super(name);
    }
    @Override
    public String toString() {
        return "Novel{" +
                "name='" + getName() + '\'' +
                '}';
    }
}

class harryPotter extends Novel{

    public harryPotter(String name) {
        super(name);
    }
    @Override
    public String toString() {
        return "harryPotter{" +
                "name='" + getName() + '\'' +
                '}';
    }
}